package com.dj.mingkong.common.exception;

/**
 * @author zenglonghui
 * @date: 2022/5/17 18:01
 */
public class BaseRuntimeException extends RuntimeException {
    private final String code;

    public BaseRuntimeException(String message) {
        this("Internal system error", message);
    }

    public BaseRuntimeException(String message, Throwable e) {
        this("Internal system error", message, e);
    }

    public BaseRuntimeException(String code, String message) {
        this(code, message, (Throwable) null);
    }

    public BaseRuntimeException(String code, String message, Throwable e) {
        super(message, e);
        this.code = code;
    }

    public String getCode() {
        return this.code;
    }
}
